package com.metal.gear.certification.entity.dto;

import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;

import com.metal.gear.common.util.query.QueryRule;
import com.metal.gear.common.util.query.QueryRuleEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

@Data
@Schema(name ="角色搜索实体")
public class SysRoleSearchDto {

    @ExcelProperty("角色名")
    @Schema(name ="角色名")
    @QueryRule(queryCondition = QueryRuleEnum.LIKE)
    private String roleName;


    @ExcelProperty("角色编码")
    @Schema(name ="角色编码")
    @QueryRule(queryCondition = QueryRuleEnum.LIKE)
    private String roleCode;


    @ExcelProperty("描述")
    @Schema(name ="描述")
    @QueryRule(queryCondition = QueryRuleEnum.LIKE)
    private String description;

    private String createBy;

    @Schema(name ="创建时间开始")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @QueryRule(queryCondition = QueryRuleEnum.GE)
    private LocalDateTime createTimeStart;

    @Schema(name ="创建时间结束")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @QueryRule(queryCondition = QueryRuleEnum.LE)
    private LocalDateTime createTimeStartEnd;

}
